.class public abstract Lcom/qiniu/auth/JSONObjectRet;
.super Lcom/qiniu/auth/CallRet;
.source "JSONObjectRet.java"


# instance fields
.field protected mIdx:I


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 7
    invoke-direct {p0}, Lcom/qiniu/auth/CallRet;-><init>()V

    return-void
.end method

.method public constructor <init>(I)V
    .registers 2
    .param p1, "idx"    # I

    .prologue
    .line 9
    invoke-direct {p0}, Lcom/qiniu/auth/CallRet;-><init>()V

    iput p1, p0, Lcom/qiniu/auth/JSONObjectRet;->mIdx:I

    return-void
.end method


# virtual methods
.method public abstract onSuccess(Lorg/json/JSONObject;)V
.end method

.method public onSuccess([B)V
    .registers 6
    .param p1, "body"    # [B

    .prologue
    .line 12
    if-nez p1, :cond_a

    .line 13
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    invoke-virtual {p0, v2}, Lcom/qiniu/auth/JSONObjectRet;->onSuccess(Lorg/json/JSONObject;)V

    .line 16
    :cond_a
    :try_start_a
    new-instance v1, Lorg/json/JSONObject;

    new-instance v2, Ljava/lang/String;

    invoke-direct {v2, p1}, Ljava/lang/String;-><init>([B)V

    invoke-direct {v1, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 17
    .local v1, "obj":Lorg/json/JSONObject;
    invoke-virtual {p0, v1}, Lcom/qiniu/auth/JSONObjectRet;->onSuccess(Lorg/json/JSONObject;)V
    :try_end_17
    .catch Lorg/json/JSONException; {:try_start_a .. :try_end_17} :catch_18

    .line 22
    .end local v1    # "obj":Lorg/json/JSONObject;
    :goto_17
    return-void

    .line 18
    :catch_18
    move-exception v0

    .line 19
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 20
    new-instance v2, Ljava/lang/Exception;

    new-instance v3, Ljava/lang/String;

    invoke-direct {v3, p1}, Ljava/lang/String;-><init>([B)V

    invoke-direct {v2, v3}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v2}, Lcom/qiniu/auth/JSONObjectRet;->onFailure(Ljava/lang/Exception;)V

    goto :goto_17
.end method
